﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Guru.Utilities
{
    public static class StringExtensions
    {
        public static string ToJString(this string s)
        {
            return s.Replace("\\", "\\x" + ((int)'\\').ToString("X")).Replace("'", "\\x" + ((int)'\'').ToString("X")).Replace("\"", "\\x" + ((int)'"').ToString("X"));
        }
    }
}
